﻿// WebZHX.Core/Entities/FlourBatchOutNew.cs
using Core.Entities;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Core.Entities
{
    /// <summary>
    /// 面粉出库批次实体
    /// </summary>
    [Table("FlourBatchOut_new")] // 指定数据库表名
    public class FlourBatchOutNew : BaseEntity<int>
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public override int Id { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [Required]
        [Column("DrawnWeight")]
        public decimal DrawnWeight { get; set; }

        /// <summary>
        /// 重量
        /// </summary>
        [Required]
        [Column("TotalWeight")]
        public decimal TotalWeight { get; set; }

        /// <summary>
        /// 其他数量
        /// </summary>
        [Required]
        [Column("RemainingWeight")]
        public decimal RemainingWeight { get; set; }

        /// <summary>
        /// 批次号（可选，根据业务需求添加）
        /// </summary>
        [MaxLength(50)]
        public string BatchNumber { get; set; }

        /// <summary>
        /// 出库时间
        /// </summary>
        public DateTime OutTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 操作人员
        /// </summary>
        [MaxLength(50)]
        public string Operator { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(500)]
        public string Remark { get; set; }
    }
}